Consider the production function of one sector in OneGTAP
Y = G(K, L, F, M, S)
Where:
- K, L: primary factors
- F, M, S: intermediate inputs
From the general note on restriction (economic feature of minimized cost function → homogeneity of degree 1 in output → equation 5), we can write the percentage change form of derived demand
for all k in DEMD_COMM (the set of inputs)
- qo: % change of output Y
- qf: % change of demand
Note: there qf refers to all input demands, not only factors (K, L)
- θ: cost share
- APE: Allen partial elasticities of substitution.
is the cross-price elasticity of demand
To solve the system of 5 inputs, we need to have 25 APE for the single sector.

Since there are three sectors (F, M, S) in economy, we need to have 25*3 = 75 APE on the producer's side.
General restriction
From the fact that APE comes from the second derivative of minimum cost function, we have the general restriction of symmetry, which helps us to eliminate the elements in the lower-diagonal triangle (10 unknown parameters)

Furthermore, the economic feature of minimized cost function leads to the homogeneous of degree 0 in price, which means the sum of elasticities of given demand equation is zero (the general restriction #3: adding-up), which allow us to drop one element each row
[because if you know the value of n-1 elements, given the row sum is fixed, the value of remaining one element is also available]
Here we just drop the diagonal elements, and reduce the number of unknown parameters from 15 to 10.

Note: it is the equation of unknown variables after applying the general restrictions: 
0.5 * (5)*4 = 10
Note that we haven't made any assumption about the particular technology of production (functional form of production) so far.
Particular restriction
To further reduce the number of parameters, we make the assumption of weak separability. Then the production function takes the form:
Y = G(VA(K, L), F, M, S)
From weak separability, we have
for all j in the set of TRAD_COMM. That helps us to remove the APE on the second row, reducing the number of unknown parameters from 10 to 7
Finally, we assume that both G and VA take the functional form of CES.
In the case of G, the cross-price APE among intermediates and between intermediates and value-added are equal to the CES parameter ESUBT, or
Note: in the note of Keller's formula, we mentioned that
is the APE between intermediates and between intermediate input and nested VA. Here
is also the APE between intermediate inputs and the primary factors (K and L) within the nested VA,
For the remaining parameter
, its value can be calculated with the Keller's formula:
, where i, j are index of factors {K, L}
Then we only need 2 unknown parameters (full elasticity of substitution of CES) instead of 25 APEs for this sector.